package com.example.controller;

import com.example.entity.User;
import com.example.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**@Description:
 *
 * @author huxiaot
 * @date 2019年10月8日
 */
@RestController
public class TestController {

    @Autowired
    TestService userService;

    @GetMapping("/u/{id}")
    public User index(@PathVariable("id") Long id) {

        User user = userService.getById(id);
        return user;

    }
}
